<!DOCTYPE html>
<html lang="en">
  <head>
    <title>CacheOptions Structure Reference</title>
    <link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../../js/jquery.min.js" defer></script>
    <script src="../../js/jazzy.js" defer></script>
    
    <script src="../../js/lunr.min.js" defer></script>
    <script src="../../js/typeahead.jquery.js" defer></script>
    <script src="../../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Struct/CacheOptions" class="dashAnchor"></a>

    <a title="CacheOptions Structure Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../../index.html">
          Kitura Docs
        </a>
         (99% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="../../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/Kitura/Kitura/">
            <img class="header-icon" src="../../img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../../index.html">Kitura Reference</a>
      <img class="carat" src="../../img/carat.png" />
      CacheOptions Structure Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/BodyParser.html">BodyParser</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/BodyParserMultiValue.html">BodyParserMultiValue</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/ContentType.html">ContentType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/Kitura.html">Kitura</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/Router.html">Router</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/RouterMiddlewareGenerator.html">RouterMiddlewareGenerator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/RouterRequest.html">RouterRequest</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/RouterResponse.html">RouterResponse</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/StaticFileServer.html">StaticFileServer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/StaticFileServer/CacheOptions.html">– CacheOptions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Classes/StaticFileServer/Options.html">– Options</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Enums/JSONPError.html">JSONPError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Enums/LinkParameter.html">LinkParameter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Enums/ParsedBody.html">ParsedBody</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Enums/RouterMethod.html">RouterMethod</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Extensions/DecodingError.html">DecodingError</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Protocols/ResponseHeadersSetter.html">ResponseHeadersSetter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Protocols/RouterMiddleware.html">RouterMiddleware</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Protocols/TypeSafeMiddleware.html">TypeSafeMiddleware</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/AdditionalCookieAttribute.html">AdditionalCookieAttribute</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/CodableHelpers.html">CodableHelpers</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/HTTPVersion.html">HTTPVersion</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/Headers.html">Headers</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/MediaType.html">MediaType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/MediaType/TopLevelType.html">– TopLevelType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/Part.html">Part</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/Part/HeaderType.html">– HeaderType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/SSLConfig.html">SSLConfig</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Structs/SwaggerDocument.html">SwaggerDocument</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura14HTTPStatusCodea">HTTPStatusCode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura16LifecycleHandlera">LifecycleHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura12RequestErrora">RequestError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura13RouterHandlera">RouterHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura22RouterParameterHandlera">RouterParameterHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura13ServerOptionsa">ServerOptions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../../Typealiases.html#/s:6Kitura17WrittenDataFiltera">WrittenDataFilter</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>CacheOptions</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CacheOptions</span></code></pre>

                </div>
              </div>
            <p>Cache configuration options for StaticFileServer.</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Kitura16StaticFileServerC12CacheOptionsV21addLastModifiedHeader06maxAgee7ControlJ012generateETagAESb_SiSbtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(addLastModifiedHeader:maxAgeCacheControlHeader:generateETag:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Kitura16StaticFileServerC12CacheOptionsV21addLastModifiedHeader06maxAgee7ControlJ012generateETagAESb_SiSbtcfc">init(addLastModifiedHeader:<wbr>maxAgeCacheControlHeader:<wbr>generateETag:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a CacheOptions instance.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">addLastModifiedHeader</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span> <span class="nv">maxAgeCacheControlHeader</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
     <span class="nv">generateETag</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>addLastModifiedHeader</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>an indication whether to set
&ldquo;Last-Modified&rdquo; header in the response.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>maxAgeCacheControlHeader</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>a max-age in seconds for
&ldquo;max-age&rdquo; value in &ldquo;Cache-Control&rdquo; header in the response</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>generateETag</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>an indication whether to set &ldquo;Etag&rdquo;
header in the response.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2021 <a class="link" href="" target="_blank" rel="external">IBM &amp; Kitura project authors</a>. All rights reserved. (Last updated: 2021-01-25)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
